<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="description" content="">
		<meta name="author" content="">
		<title>门店信息</title>
		<link rel="stylesheet" href="../../css/base.css" />
		<link rel="stylesheet" href="../../css/common.css" />
		<!-- Bootstrap Core CSS -->
		<link href="../../sbadmin/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
		<!-- MetisMenu CSS -->
		<link href="../../sbadmin/bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">
		<!-- DataTables CSS -->
		<link href="../../sbadmin/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" rel="stylesheet">
		<!-- Custom CSS -->
		<link href="../../sbadmin/dist/css/sb-admin-2.css" rel="stylesheet">
		<!-- Custom Fonts -->
		<link href="../../sbadmin/bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
		<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
		<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
		<!--[if lt IE 9]>
	<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
	<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
	<![endif]-->
		<style>
			body {
				padding: 0 15px !important;
			}
			
			.wo-form-itemcc {
				width: 200px;
			}
		</style>
	</head>

	<body style="background:#FFF;">
		<div class="comm-tt-font pr">
			门店信息 > 门店详情
		</div>
		<div class="shop-detail-box pr">
			<a href="edit.html" class="pm-edit-btn">修改门店信息</a>
			<div class="wop-name"><label id="shopName"></label></div>
			<div class="wo-form-item clb">
				<div class="fl">
					<div class="wo-form-itemtt fl">门店编号：</div>
					<div class="wo-form-itemcc fl" id="shopCode"></div>
				</div>
				<div class="fl ml100">
					<div class="wo-form-itemtt fl">详细地址：</div>
					<div class="wo-form-itemcc fl" id="shopAddr"></div>
				</div>
			</div>
			<div class="wo-form-item clb">
				<div class="fl">
					<div class="wo-form-itemtt fl">城市：</div>
					<div class="wo-form-itemcc fl" id="shopCity"></div>
				</div>
				<div class="fl ml100">
					<div class="wo-form-itemtt fl">营业时间：</div>
					<div class="wo-form-itemcc fl" id="shopTime"></div>
				</div>
			</div>
			<div class="wo-form-item clb">
				<div class="fl">
					<div class="wo-form-itemtt fl">区域：</div>
					<div class="wo-form-itemcc fl" id="shopArea">
					</div>
				</div>
				<div class="fl ml100">
					<div class="wo-form-itemtt fl">门店类型：</div>
					<div class="wo-form-itemcc fl" id="shopType"></div>
				</div>
			</div>
			<div class="wo-form-item clb">
				<div class="fl">
					<div class="wo-form-itemtt fl">电话：</div>
					<div class="wo-form-itemcc fl" id="shopTel">Abcd12345678</div>
				</div>
				<div class="fl ml100">
					<div class="wo-form-itemtt fl">拍摄场景：</div>
					<div class="wo-form-itemcc fl" id="shopCj">13162010826</div>
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="wo-form-itemtt fl">门店介绍：</div>
				<div class="wod-form-itemcc fl" id="shopJs">
					我们是一个 “朝阳”的行业，引领着社会的需求，蓬勃发展；我们是一个“美”的行业，美的特质吸引了无数优秀人士加入。80余位高级摄影师、造型师在平等竞争的工作环 境中展示着高超技艺。我们是一个 “朝阳”的行业，引领着社会的需求，蓬勃发展；我们是一个“美”的行业，美的特质吸引了无数优秀人士加入。80余位高级摄影师、造型 师在平等竞争的工作环境中展示着高超技艺。
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="wo-form-itemtt fl">门店图片：</div>
				<div class="wod-form-itemcc fl">
					<img src="" id="shopImg">
				</div>
			</div>
		</div>

		<!-- jQuery -->
		<script src="../../sbadmin/bower_components/jquery/dist/jquery.min.js"></script>
		<!-- Bootstrap Core JavaScript -->
		<script src="../../sbadmin/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
		<!-- Metis Menu Plugin JavaScript -->
		<script src="../../sbadmin/bower_components/metisMenu/dist/metisMenu.min.js"></script>
		<!-- DataTables JavaScript -->
		<script src="../../sbadmin/bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
		<script src="../../sbadmin/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"></script>
		<!-- Custom Theme JavaScript -->
		<script src="../../sbadmin/dist/js/sb-admin-2.js"></script>
		<script src="../../js/layer/layer.js"></script>
		<script type="text/javascript" src="../../js/common.js"></script>
		<!-- Page-Level Demo Scripts - Tables - Use for reference -->
	</body>
	<script>
		$(function() {
			var did = localStorage.getItem("did");
			var user = {
				"store": {
					"id": did
				}
			}
			$.ajax({
				url: "https://order.wz1996.wang/wzbg/store/query",
				type: 'post',
				contentType: 'application/json',
				data: JSON.stringify(user),
				beforeSend: function(request) {
					request.setRequestHeader("token", localStorage.getItem("token"));
				},
				success: function(data) {
					console.log(data)
					if(data.code == "1") {
						$("#shopName").html(data.data[0].store.name);
						$("#shopCode").html(data.data[0].store.code);
						$("#shopAddr").html(data.data[0].store.address);
						$("#shopCity").html(data.data[0].store.cityName);
						localStorage.setItem("cityId", data.data[0].store.cityId);
						$("#shopTime").html(data.data[0].store.openingHours);
						$("#shopArea").html(data.data[0].store.districtName);
						var html = "";
						for(var i = 0; i < data.data[0].storeType.length; i++) {
							html += "<span class='mr5'>" + data.data[0].storeType[i].name + "</span>";
						}
						$("#shopType").html(html);
						$("#shopTel").html(data.data[0].store.phone);
						if(data.data[0].store.specialty == "1") {
							$("#shopCj").html("内景");
						} else if(data.data[0].store.specialty == "11") {
							$("#shopCj").html("内景、外景");
						} else if(data.data[0].store.specialty == "111") {
							$("#shopCj").html("内景、外景、街拍");
						} else if(data.data[0].store.specialty == "101") {
							$("#shopCj").html("内景、街拍");
						} else if(data.data[0].store.specialty == "110") {
							$("#shopCj").html("外景、街拍");
						} else if(data.data[0].store.specialty == "10") {
							$("#shopCj").html("外景");
						} else if(data.data[0].store.specialty == "100") {
							$("#shopCj").html("街拍");
						}
						$("#shopJs").html(data.data[0].store.introduction);
						$("#shopImg").attr("src", data.data[0].store.imageUrl);
					} else if(data.code == "-1") {
						layar(data.msg);
						setTimeout("window.parent.frames.location.href='/xcxadmin/login.html'", 1000)
					} else {
						layar(data.msg);
					}
				},
				error: function(e) {
					errcode(e);
				}
			});
		});
	</script>

</html>